<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>导航栏</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        li {
            list-style: none;
        }
        .banner {
            width: 760px;
            height: 350px;
            background-color: pink;
            margin: 0 auto;
        }
        .banner img {
            width: 100%;
            height: 100%;
        }

        .nav {
            width: 760px;
            height: 40px;
            background-color: #333333;
            margin: 0 auto;
        }

        .nav ul li {
            float: left;
        }
        .nav ul li a {
            text-align: center;
            line-height: 40px;
            /* margin-right: 10px; */
            text-decoration: none;
            color: white;
            /* a是行内元素 设置大小必须先转化为行内块 */
            display: inline-block;
            height: 40px;
            width: 80px;
            background-color: #333333;
        }

        .nav ul li a:hover{
            background-color: white;
            color: orange;
        }
    </style>
</head>
<body>
    <div class="banner">
        <img src="./img/3.png" alt="">
    </div>
    <div class="nav">
        <ul>
            <li><a href="#">网站首页</a></li>
            <li><a href="#">网站首页</a></li>
            <li><a href="#">网站首页</a></li>
            <li><a href="#">网站首页</a></li>
            <li><a href="#">网站首页</a></li>
            <li><a href="#">网站首页</a></li>
        </ul>
    </div>
</body>
</html>